/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.com.peluq.model.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego_M
 */
@Embeddable
public class CobChequePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "cob_cod", nullable = false)
    private int cobCod;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ent_emisora_cod", nullable = false)
    private int entEmisoraCod;
    @Basic(optional = false)
    @NotNull
    @Column(name = "che_nro", nullable = false)
    private int cheNro;

    public CobChequePK() {
    }

    public CobChequePK(int cobCod, int entEmisoraCod, int cheNro) {
        this.cobCod = cobCod;
        this.entEmisoraCod = entEmisoraCod;
        this.cheNro = cheNro;
    }

    public int getCobCod() {
        return cobCod;
    }

    public void setCobCod(int cobCod) {
        this.cobCod = cobCod;
    }

    public int getEntEmisoraCod() {
        return entEmisoraCod;
    }

    public void setEntEmisoraCod(int entEmisoraCod) {
        this.entEmisoraCod = entEmisoraCod;
    }

    public int getCheNro() {
        return cheNro;
    }

    public void setCheNro(int cheNro) {
        this.cheNro = cheNro;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cobCod;
        hash += (int) entEmisoraCod;
        hash += (int) cheNro;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CobChequePK)) {
            return false;
        }
        CobChequePK other = (CobChequePK) object;
        if (this.cobCod != other.cobCod) {
            return false;
        }
        if (this.entEmisoraCod != other.entEmisoraCod) {
            return false;
        }
        if (this.cheNro != other.cheNro) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.peluq.model.entity.CobChequePK[ cobCod=" + cobCod + ", entEmisoraCod=" + entEmisoraCod + ", cheNro=" + cheNro + " ]";
    }
    
}
